@layout("/common/default.html",{title:'添加',libs:['form']}){

<!--form表单-->
<form class="layui-form"  lay-filter="layui-form-quartz" id="layui-form-quartz">

    <input type="hidden" id="onlyid" name="id" value="${quartzLog.id}">
    <input type="hidden"  id="op" value="${quartzLog.op}">

    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header">基本信息</div>

            <div class="layui-card-body">
                <div class="layui-form-item layui-row">
                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务名称</label>
                        <div class="layui-input-block">
                            <input type="text"  id="jobName" name="jobName" value="${quartzLog.jobName!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务组名</label>
                        <div class="layui-input-block">
                            <input type="text"  id="jobGroup" name="jobGroup" value="${quartzLog.jobGroup!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">任务执行时调用的类</label>
                        <div class="layui-input-block">
                            <input type="text"  id="beanClass" name="beanClass" value="${quartzLog.beanClass!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">类的方法</label>
                        <div class="layui-input-block">
                            <input type="text"  id="methodName" name="methodName" value="${quartzLog.methodName!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">参数</label>
                        <div class="layui-input-block">
                            <input type="text"  id="params" name="params" value="${quartzLog.params!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">耗时</label>
                        <div class="layui-input-block">
                            <input type="text"  id="time" name="time" value="${quartzLog.time!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">执行状态（0正常 1失败）</label>
                        <div class="layui-input-block">
                            <input type="text"  id="status" name="status" value="${quartzLog.status!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">异常信息</label>
                        <div class="layui-input-block">
                            <input type="text"  id="exceptionInfo" name="exceptionInfo" value="${quartzLog.exceptionInfo!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">更新者</label>
                        <div class="layui-input-block">
                            <input type="text"  id="updateBy" name="updateBy" value="${quartzLog.updateBy!}" lay-verify="required"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">更新时间</label>
                        <div class="layui-input-block">
                            <input type="text"  id="updateDate" name="updateDate"  placeholder="yyyy-MM-dd HH:mm:ss"  class="layui-input">
                        </div>
                    </div>


                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">备注信息</label>
                        <div class="layui-input-block">
                            <input type="text"  id="remarks" name="remarks" value="${quartzLog.remarks!}" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                </div>
            </div>
        </div>

    </div>
    <div class="form-group-bottom" style="z-index: 200" align="center">
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>
        <button   id="btnclose" class="layui-btn layui-btn-primary"  >&emsp;取消&emsp;</button>
    </div>

</form>
<script>

    layui.use(['form','utils', 'resAjax', 'submitform', 'openLayer','laydate'], function () {
        let $ = layui.$,
            form = layui.form,
            laydate = layui.laydate,
            utils = layui.utils,
            openLayer = layui.openLayer,
            submitform=layui.submitform,
            resAjax =layui.resAjax;

        //为表单赋初始值
        form.val('layui-form-quartz', {
        });

                laydate.render({
                    elem: '#updateDate'
                    ,type: 'datetime'
                });




            form.on("submit(btnSubmit)", function (data) {
                var field=data.field;
                // 请求后台
                submitform.form('/quartz/quartzLog/save',field);
                // TODO 权限节点校验
                return false;
            });


        });
</script>

@}
